package com.teamsea.bean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

public class BeanFactoryPostProcessorImpl implements BeanFactoryPostProcessor {

    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        System.out.println("BeanFactoryPostProcessorImpl");
        System.out.println(beanFactory);

        // 获取BeanDefinition对象
        BeanDefinition beanDefinition = beanFactory.getBeanDefinition("bean01");

        String beanClassName = beanDefinition.getBeanClassName();

        System.out.println(beanClassName);

    }

}
